package com.csy.chat;

import java.text.*;
import java.util.Date;

public class getCurrent_time {
    private String time;
    public getCurrent_time()
    {
        this.time=this.getStringDate();
    }
    public getCurrent_time(getCurrent_time time)
    {
        this.time=time.getTime();
    }

    public String getStringDate()
    {
        Date currentTime = new Date();
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        time = formatter.format(currentTime);
        return time;
    }
    public String getTime()
    {
        return this.time;
    }
}
